

import request from '../utils/request';

/**
 * 获取订单商品列表 - 立即购买进来
 */
export const getTradeInfoByBuyNowApi = (goodsId, blessing) => {
  return request(`/order/buy/${goodsId}`, { blessing });
}

/**
 * 获取订单商品列表 - 购物车进来
 */
export const getTradeInfoByCartApi = () => {
  return request(`/order/trade`);
}

/**
 * 获取微信支付参数
 */
export const getWeiXinPayParamsApi = (orderNo) => {
  return request(`/webChat/createJsapi/${orderNo}`);
}

/**
 * 创建订单
 */
export const createOrderApi = (data) => {
  return request(`/order/submitOrder`, data, 'POST');
}
